package com.monkeybrother.utils;

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class JsonTxtToBean {
    public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(Files.newInputStream(Paths.get("C:\\Users\\Administrator\\Desktop\\1.txt"))));
        Set<String> stringList = new HashSet<>();
        String line = null;
        while ((line = input.readLine()) != null) {
            if (line.contains("wosUrl")) {
//                System.out.println(line);
                System.out.println(line.split(" : ")[1].trim().replace("\"", ""));
                stringList.add(line.split(" : ")[1].trim().replace("\"", ""));
            }
        }


        BufferedReader input2 = new BufferedReader(new InputStreamReader(Files.newInputStream(Paths.get("C:\\Users\\Administrator\\Desktop\\2.txt"))));

        String line2 = null;
        while ((line2 = input2.readLine()) != null) {
            if (line2.contains("wosUrl")) {
//                System.out.println(line);
                System.out.println(line2.split(" : ")[1].trim().replace("\"", ""));
                stringList.add(line2.split(" : ")[1].trim().replace("\"", ""));
            }
        }



    }
}
